# -*- coding=utf-8 -*-

##转自：https://www.zhihu.com/question/19948002

#作者：李医生
#链接：https://www.zhihu.com/question/19948002/answer/96644236
#来源：知乎
#著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。

#!/usr/bin/env python


def group_count(groups,count):
    groups = groups

    values = [i for i in range(1, count+1)]
    values.sort(reverse=True)

    load_balance_groups = [[] for grp in range(groups)]

    for v in values:
        load_balance_groups.sort(key=lambda x: sum(x))
        load_balance_groups[0].append(v)
    return load_balance_groups

if __name__ == '__main__':
    grouplist=group_count(5,100)
    for per in grouplist:
        print(per)



